import Vue from 'vue'
// import VueRouter from 'vue-router'
import router from './routes'
import Less from 'Less'
import axios from './util/ajax'
import store from './store'
import VueLazyload from 'vue-lazyload'
import _global from '../src/assets/js/global'
// import Element from 'element-ui'
import App from './App.vue'
// import Loading from './layout/loading'
// import '../node_modules/element-ui/lib/theme-chalk/index.css'
// import 'element-ui/lib/theme-chalk/index.css'
// import './element-ui/lib/theme-chalk/index.css';
import { Verify } from 'crypto';
// import MintUI from 'mint-ui'
// import 'mint-ui/lib/style.css'
import MuseUI from 'muse-ui';
import 'muse-ui/dist/muse-ui.css';
require('./assets/css/base.css'); //全局引入
import theme from 'muse-ui/lib/theme';
import * as colors from 'muse-ui/lib/theme/colors';
import 'typeface-roboto'
import 'material-design-icons/iconfont/material-icons.css'
import 'muse-ui-loading/dist/muse-ui-loading.css';
import Loading from 'muse-ui-loading';
import Toast from 'muse-ui-toast';
import 'muse-ui-message/dist/muse-ui-message.css';
import Message from 'muse-ui-message';
theme.add('custom-theme', {
  primary: colors.indigo,
  secondary: colors.pinkA200
});
Vue.use(Less);
// Vue.use(VueRouter);
// Vue.use(Loading);
Vue.use(Message);
Vue.use(MuseUI);
Vue.use(Toast);
Vue.use(Loading);
// Vue.use(Element)
Vue.use(VueLazyload, {
    preLoad: 1.3,
    error: require('./assets/images/err.png'),
    loading: require('./assets/images/loading.gif'),
    attempt: 1,
    listenEvents: ['scroll']
});
// const router = new VueRouter({
//     mode: 'history',
//     scorllBehavior: () => ({
//         y: 0

//     }),
//     routes
// });
Vue.config.productionTip = false
Vue.prototype.$axios = axios;
Vue.prototype.$_global = _global
/*axios.defaults.baseURL = (process.env.NODE_ENV !=='production' ? config.dev.httpUrl:config.build.httpUrl);
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';*/
new Vue({
    router,
    store,
    axios,
    _global,
    render: h => h(App)
}).$mount('#app')
